<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Questioning
  
    &mdash; Documentation by YARD 0.7.3
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (Q)</a> &raquo; 
    
    
    <span class="title">Questioning</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Questioning
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">ActiveRecord::Base</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ActiveRecord::Base</li>
          
            <li class="next">Questioning</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">app/models/questioning.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
ELMO - Secure, robust, and versatile data collection. Copyright 2011 The
Carter Center
</p>
<p>
ELMO is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
</p>
<p>
ELMO is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
</p>
<p>
You should have received a copy of the GNU General Public License along
with ELMO. If not, see &lt;http://www.gnu.org/licenses/&gt;.
</p>


  </div>
</div>
<div class="tags">
  

</div>

  


  

  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#duplicate-class_method" title="duplicate (class method)">+ (Object) <strong>duplicate</strong>(qings) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
clones a set of questionings, including their conditions assumes qings are
in order in which they appear on the form does not save qings and
conditions, just initializes them.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#new_with_question-class_method" title="new_with_question (class method)">+ (Object) <strong>new_with_question</strong>(params = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#answer_required%3F-instance_method" title="#answer_required? (instance method)">- (Boolean) <strong>answer_required?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#condition%3D-instance_method" title="#condition= (instance method)">- (Object) <strong>condition=</strong>(c) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get_or_init_condition-instance_method" title="#get_or_init_condition (instance method)">- (Object) <strong>get_or_init_condition</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#has_condition%3F-instance_method" title="#has_condition? (instance method)">- (Boolean) <strong>has_condition?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#is_question_method%3F-instance_method" title="#is_question_method? (instance method)">- (Boolean) <strong>is_question_method?</strong>(symbol) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#old_condition%3D-instance_method" title="#old_condition= (instance method)">- (Object) <strong>old_condition=</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#other_forms-instance_method" title="#other_forms (instance method)">- (Object) <strong>other_forms</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
returns any forms other than this one on which this questionings question
appears.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#previous_qings-instance_method" title="#previous_qings (instance method)">- (Object) <strong>previous_qings</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#published%3F-instance_method" title="#published? (instance method)">- (Boolean) <strong>published?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#respond_to%3F-instance_method" title="#respond_to? (instance method)">- (Boolean) <strong>respond_to?</strong>(symbol, *) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">- (Boolean) <strong>respond_to_missing?</strong>(symbol, include_private) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#update_rank-instance_method" title="#update_rank (instance method)">- (Object) <strong>update_rank</strong>(new_rank) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#verify_condition_ordering-instance_method" title="#verify_condition_ordering (instance method)">- (Object) <strong>verify_condition_ordering</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  


  <div id="method_missing_details" class="method_details_list">
  <h2>Dynamic Method Handling</h2>
  <p class="notice this">
    This class handles dynamic methods through the <tt>method_missing</tt> method
    
  </p>
  
    <div class="method_details first">
  <p class="signature first" id="method_missing-instance_method">
  
    - (<tt>Object</tt>) <strong>method_missing</strong>(*args) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


68
69
70
71
72
73
74
75</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 68</span>

<span class='def def kw'>def</span> <span class='method_missing identifier id'>method_missing</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
  <span class='comment val'># pass appropriate methods on to question</span>
  <span class='if if kw'>if</span> <span class='is_question_method? fid id'>is_question_method?</span><span class='lparen token'>(</span><span class='args identifier id'>args</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span><span class='rparen token'>)</span>
    <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
  <span class='else else kw'>else</span>
    <span class='super super kw'>super</span>
  <span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="duplicate-class_method">
  
    + (<tt>Object</tt>) <strong>duplicate</strong>(qings) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
clones a set of questionings, including their conditions assumes qings are
in order in which they appear on the form does not save qings and
conditions, just initializes them
</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 38</span>

<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='duplicate identifier id'>duplicate</span><span class='lparen token'>(</span><span class='qings identifier id'>qings</span><span class='rparen token'>)</span>
  <span class='comment val'># create basic clones and store cleverly</span>
  <span class='qid_hash identifier id'>qid_hash</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='semicolon token'>;</span> <span class='new_qings identifier id'>new_qings</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
  <span class='qings identifier id'>qings</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='qing identifier id'>qing</span><span class='bitor op'>|</span>
    <span class='comment val'># create the basis clone</span>
    <span class='new_qing identifier id'>new_qing</span> <span class='assign token'>=</span> <span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:question_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='question_id identifier id'>question_id</span><span class='comma token'>,</span> <span class='symbol val'>:rank</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='rank identifier id'>rank</span><span class='comma token'>,</span> <span class='symbol val'>:required</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='required identifier id'>required</span><span class='comma token'>,</span> <span class='symbol val'>:hidden</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='hidden identifier id'>hidden</span><span class='rparen token'>)</span>
    <span class='comment val'># store in the hash (in case it's needed during condition cloning for later qings)</span>
    <span class='qid_hash identifier id'>qid_hash</span><span class='lbrack token'>[</span><span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='question_id identifier id'>question_id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='new_qing identifier id'>new_qing</span>
    <span class='comment val'># clone the condition if necessary</span>
    <span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='condition identifier id'>condition</span><span class='dot token'>.</span><span class='duplicate identifier id'>duplicate</span><span class='lparen token'>(</span><span class='new_qing identifier id'>new_qing</span><span class='comma token'>,</span> <span class='qid_hash identifier id'>qid_hash</span><span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='qing identifier id'>qing</span><span class='dot token'>.</span><span class='condition identifier id'>condition</span>
    <span class='comment val'># store in the array</span>
    <span class='new_qings identifier id'>new_qings</span> <span class='lshft op'>&lt;&lt;</span> <span class='new_qing identifier id'>new_qing</span>
  <span class='end end kw'>end</span>
  <span class='comment val'># return the cloned qings</span>
  <span class='new_qings identifier id'>new_qings</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="new_with_question-class_method">
  
    + (<tt>Object</tt>) <strong>new_with_question</strong>(params = {}) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


31
32
33</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 31</span>

<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='new_with_question identifier id'>new_with_question</span><span class='lparen token'>(</span><span class='params identifier id'>params</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
  <span class='qing identifier id'>qing</span> <span class='assign token'>=</span> <span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='params identifier id'>params</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='symbol val'>:question</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Question constant id'>Question</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="answer_required?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>answer_required?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


55
56
57</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 55</span>

<span class='def def kw'>def</span> <span class='answer_required? fid id'>answer_required?</span>
  <span class='required? fid id'>required?</span> <span class='andop op'>&amp;&amp;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='dot token'>.</span><span class='name identifier id'>name</span> <span class='neq op'>!=</span> <span class='string val'>&quot;select_multiple&quot;</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="condition=-instance_method">
  
    - (<tt>Object</tt>) <strong>condition=</strong>(c) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


96
97
98
99
100
101
102
103
104
105</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 96</span>

<span class='def def kw'>def</span> <span class='condition= identifier id'>condition=</span><span class='lparen token'>(</span><span class='c identifier id'>c</span><span class='rparen token'>)</span>
  <span class='return return kw'>return</span> <span class='old_condition identifier id'>old_condition</span><span class='assign token'>=</span><span class='lparen token'>(</span><span class='c identifier id'>c</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='Hash constant id'>Hash</span><span class='rparen token'>)</span>
  <span class='comment val'># if all attribs are blank, destroy the condition if it exists</span>
  <span class='if if kw'>if</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='reject identifier id'>reject</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='k identifier id'>k</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='bitor op'>|</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='blank? fid id'>blank?</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span>
    <span class='condition identifier id'>condition</span><span class='dot token'>.</span><span class='destroy identifier id'>destroy</span> <span class='if if_mod kw'>if</span> <span class='condition identifier id'>condition</span>
  <span class='comment val'># otherwise, set the attribs or build a new condition if none exists</span>
  <span class='else else kw'>else</span>
    <span class='condition identifier id'>condition</span> <span class='integer val'>? </span><span class='condition identifier id'>condition</span><span class='dot token'>.</span><span class='attributes identifier id'>attributes</span> <span class='assign token'>=</span> <span class='c identifier id'>c</span> <span class='colon op'>:</span> <span class='build_condition identifier id'>build_condition</span><span class='lparen token'>(</span><span class='c identifier id'>c</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='symbol val'>:questioning</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
  <span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="get_or_init_condition-instance_method">
  
    - (<tt>Object</tt>) <strong>get_or_init_condition</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


107
108
109</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 107</span>

<span class='def def kw'>def</span> <span class='get_or_init_condition identifier id'>get_or_init_condition</span>
  <span class='has_condition? fid id'>has_condition?</span> <span class='integer val'>? </span><span class='condition identifier id'>condition</span> <span class='colon op'>:</span> <span class='build_condition identifier id'>build_condition</span><span class='lparen token'>(</span><span class='symbol val'>:questioning</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="has_condition?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>has_condition?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


94</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 94</span>

<span class='def def kw'>def</span> <span class='has_condition? fid id'>has_condition?</span><span class='semicolon token'>;</span> <span class='notop op'>!</span><span class='condition identifier id'>condition</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="is_question_method?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>is_question_method?</strong>(symbol) 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


85
86
87</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 85</span>

<span class='def def kw'>def</span> <span class='is_question_method? fid id'>is_question_method?</span><span class='lparen token'>(</span><span class='symbol identifier id'>symbol</span><span class='rparen token'>)</span>
  <span class='symbol identifier id'>symbol</span><span class='dot token'>.</span><span class='match identifier id'>match</span><span class='lparen token'>(</span><span class='regexp val'>/^((name|hint)_([a-z]{3})(=?)|code=?|option_set_id=?|question_type_id=?)(_before_type_cast)?$/</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="old_condition=-instance_method">
  
    - (<tt>Object</tt>) <strong>old_condition=</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


29</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 29</span>

<span class='alias alias kw'>alias</span> <span class='symbol val'>:old_condition=</span> <span class='symbol val'>:condition=</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="other_forms-instance_method">
  
    - (<tt>Object</tt>) <strong>other_forms</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
returns any forms other than this one on which this questionings question
appears
</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


64
65
66</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 64</span>

<span class='def def kw'>def</span> <span class='other_forms identifier id'>other_forms</span>
  <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='forms identifier id'>forms</span><span class='dot token'>.</span><span class='reject identifier id'>reject</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='f identifier id'>f</span><span class='bitor op'>|</span> <span class='f identifier id'>f</span> <span class='eq op'>==</span> <span class='form identifier id'>form</span><span class='rbrace token'>}</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="previous_qings-instance_method">
  
    - (<tt>Object</tt>) <strong>previous_qings</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


111
112
113</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 111</span>

<span class='def def kw'>def</span> <span class='previous_qings identifier id'>previous_qings</span>
  <span class='form identifier id'>form</span><span class='dot token'>.</span><span class='questionings identifier id'>questionings</span><span class='dot token'>.</span><span class='reject identifier id'>reject</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='q identifier id'>q</span><span class='bitor op'>|</span> <span class='notop op'>!</span><span class='rank identifier id'>rank</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span> <span class='andop op'>&amp;&amp;</span> <span class='lparen token'>(</span><span class='q identifier id'>q</span> <span class='eq op'>==</span> <span class='self self kw'>self</span> <span class='orop op'>||</span> <span class='q identifier id'>q</span><span class='dot token'>.</span><span class='rank identifier id'>rank</span> <span class='gt op'>&gt;</span> <span class='rank identifier id'>rank</span><span class='rparen token'>)</span><span class='rbrace token'>}</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="published?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>published?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


59
60
61</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 59</span>

<span class='def def kw'>def</span> <span class='published? fid id'>published?</span>
  <span class='form identifier id'>form</span><span class='dot token'>.</span><span class='published? fid id'>published?</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="respond_to?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>respond_to?</strong>(symbol, *) 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


77
78
79</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 77</span>

<span class='def def kw'>def</span> <span class='respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol identifier id'>symbol</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rparen token'>)</span>
  <span class='is_question_method? fid id'>is_question_method?</span><span class='lparen token'>(</span><span class='symbol identifier id'>symbol</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='super super kw'>super</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="respond_to_missing?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>respond_to_missing?</strong>(symbol, include_private) 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


81
82
83</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 81</span>

<span class='def def kw'>def</span> <span class='respond_to_missing? fid id'>respond_to_missing?</span><span class='lparen token'>(</span><span class='symbol identifier id'>symbol</span><span class='comma token'>,</span> <span class='include_private identifier id'>include_private</span><span class='rparen token'>)</span>
  <span class='is_question_method? fid id'>is_question_method?</span><span class='lparen token'>(</span><span class='symbol identifier id'>symbol</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='super super kw'>super</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="update_rank-instance_method">
  
    - (<tt>Object</tt>) <strong>update_rank</strong>(new_rank) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


89
90
91
92</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 89</span>

<span class='def def kw'>def</span> <span class='update_rank identifier id'>update_rank</span><span class='lparen token'>(</span><span class='new_rank identifier id'>new_rank</span><span class='rparen token'>)</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rank identifier id'>rank</span> <span class='assign token'>=</span> <span class='new_rank identifier id'>new_rank</span>
  <span class='save identifier id'>save</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="verify_condition_ordering-instance_method">
  
    - (<tt>Object</tt>) <strong>verify_condition_ordering</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


115
116
117</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/questioning.rb', line 115</span>

<span class='def def kw'>def</span> <span class='verify_condition_ordering identifier id'>verify_condition_ordering</span>
  <span class='condition identifier id'>condition</span><span class='dot token'>.</span><span class='verify_ordering identifier id'>verify_ordering</span> <span class='if if_mod kw'>if</span> <span class='condition identifier id'>condition</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Thu Dec  8 13:43:21 2011 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.3 (ruby-1.8.7).
</div>

  </body>
</html>